<meta charset="utf-8">
<div class="box box-primary" id="pmpWeekly_edit"
	style="max-width: 1200px;">
	<form role="form" id="editForm" class="form-horizontal">
		<div class="box-body">
			<div class="form-group">
				<label for="thisWeekSummary" class="col-sm-2 control-label">本周总结</label>
				<textarea rows="" cols="" name="thisWeekSummary"
					v-model="pmpWeekly.thisWeekSummary" class="form-control"
					id="thisWeekSummary" required></textarea>
			</div>
			<div class="form-group">
				<label for="nextWeekPlan" class="col-sm-2 control-label">下周计划</label>
				<div class="col-sm-10">
					<input type="text" name="nextWeekPlan"
						v-model="pmpWeekly.nextWeekPlan" class="form-control"
						id="nextWeekPlan" required />
				</div>
			</div>
			<div class="form-group">
				<label for="thisWeeklyRemark" class="col-sm-2 control-label">备注</label>
				<div class="col-sm-10">
					<input type="text" name="thisWeeklyRemark"
						v-model="pmpWeekly.thisWeekRemark" class="form-control"
						id="thisWeeklyRemark" required />
				</div>
			</div>
		</div>
		<div class="box-footer">
			<button type="button" class="btn btn-default" v-on:click="cancle">取消</button>
			<button type="button" class="btn btn-info pull-right"
				v-on:click="update">提交</button>
		</div>
	</form>
	<script type="text/javascript">
		var news = new Vue(
				{
					el : '#pmpWeekly_edit',
					data : {
						pmpWeekly : {
							id : null,
							thisWeekSummary : null,
							thisWeekRemark : null,
							nextWeekPlan : null
						},
						bus : new Vue(),
					},
					mounted : function() {
						var _this = this;
						var param = zfesLayerEditDg.getLayerParam();//pmpWeeklyId 
						_this.pmpWeekly.id = param.id;
						var url = "/pmp/service/pub/pmpWeekly/loadPmpWeekly";
						zfesAjax.ajaxTodo(url, param, function(data) {
							_this.$data.pmpWeekly = data.data.pmpWeekly;
						})
					},
					methods : {
						update : function() {
							if ($("#editForm").valid()) {
								let _this = this;
								let url = "/pmp/service/pub/pmpWeekly/updatePmpWeekly";
								zfesAjax
										.ajaxTodo(
												url,
												_this.$data.pmpWeekly,
												function(data) {
													alertSwal
															.successText(data.message);
													layer.close(layer.index);
												})
							}
						},
						cancle : function() {
							layer.close(layer.index);
						}
					}
				});
	</script>
</div>
